package com.xbongbong.admin.domain.entity;

import com.xbongbong.paas.domain.entity.PaasFormExplainEntity;
import com.xbongbong.paas.toolbox.wrap.Entity;
import com.xbongbong.saas.domain.entity.WorkOrderExplainEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @author guohui.zhang
 * @Title: 应用表单解释副本表(镜像3.0回退到上一版本)
 * @date 2020/3/179:54
 */
@Getter
@Setter
@ToString
public class PaasFormExplainRetainEntity extends Entity {
    private static final long serialVersionUID = 5625356964658931318L;

    //========== properties ==========

    /**
     * 主键
     */
    private Long id;
    /**
     * 公司id
     */
    private String corpid;
    /**
     * 备份应用id
     */
    private Long retainAppId;
    /**
     * 原应用id
     */
    private Long sourceAppId;
    /**
     * 原菜单id
     */
    private Long sourceMenuId;
    /**
     * 原表单id
     */
    private Long sourceFormId;
    /**
     * 原表单解释id
     */
    private Long sourceFormExplainId;
    /**
     * 表单id
     */
    private Integer enable;
    /**
     * 表单字段解释主体
     */
    private String explains;
    /**
     * 创建者id
     */
    private String creatorId;
    /**
     * 创建时间时间戳
     */
    private Long addTime;
    /**
     * 更新时间时间戳
     */
    private Long updateTime;
    /**
     * 删除标记
     */
    private Integer del;
    /**
     * 标记 1：saas；2：paas
     */
    private Integer saasMark;
    /**
     * saas业务类型
     */
    private Integer businessType;
    /**
     * 经销商标识
     */
    private Integer distributorMark;

    public PaasFormExplainRetainEntity() {
    }

    public PaasFormExplainRetainEntity(PaasFormExplainEntity paasFormExplainEntity) {
        this.corpid = paasFormExplainEntity.getCorpid();
        this.sourceAppId = paasFormExplainEntity.getAppId();
        this.sourceMenuId = paasFormExplainEntity.getMenuId();
        this.sourceFormId = paasFormExplainEntity.getFormId();
        this.sourceFormExplainId = paasFormExplainEntity.getId();
        this.enable = paasFormExplainEntity.getEnable();
        this.explains = paasFormExplainEntity.getExplains();
        this.creatorId = paasFormExplainEntity.getCreatorId();
        this.addTime = paasFormExplainEntity.getAddTime();
        this.updateTime = paasFormExplainEntity.getUpdateTime();
        this.del = paasFormExplainEntity.getDel();
        this.saasMark = paasFormExplainEntity.getSaasMark();
        this.businessType = paasFormExplainEntity.getBusinessType();
        this.distributorMark = paasFormExplainEntity.getDistributorMark();
    }

    public PaasFormExplainRetainEntity(WorkOrderExplainEntity workOrderExplainEntity) {
        this.corpid = workOrderExplainEntity.getCorpid();
        this.sourceAppId = workOrderExplainEntity.getAppId();
        this.sourceMenuId = workOrderExplainEntity.getMenuId();
        this.sourceFormId = workOrderExplainEntity.getFormId();
        this.sourceFormExplainId = workOrderExplainEntity.getId();
        this.enable = 1;
        this.explains = workOrderExplainEntity.getExplains();
        this.creatorId = workOrderExplainEntity.getCreatorId();
        this.addTime = workOrderExplainEntity.getAddTime();
        this.updateTime = workOrderExplainEntity.getUpdateTime();
        this.del = workOrderExplainEntity.getDel();
    }
}
